package cn.xxc.feignclient;

import cn.xxc.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@FeignClient(value = "user-server",fallbackFactory = UserFeignClientFallback.class)
public interface UserFeignClient {
    @RequestMapping(value = "/user/{id}",method = RequestMethod.GET)
    User getUser(@PathVariable("id")Long id);
}
